<%--
  Created by IntelliJ IDEA.
  User: zhang
  Date: 2023/10/6
  Time: 12:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>发布博客</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }

        .pubblog-body {
            position: relative;
            top: 0px;
            left: 0px;
            width: 1150px;
            height: 900px;
            overflow: hidden;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        h1 {
            font-size: 28px;
            text-align: center;
            margin-bottom: 20px;
        }

        label {
            font-weight: bold;
            display: block;
            margin-bottom: 5px;
        }

        input[type="text"],
        textarea {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        input[type="text"]:focus,
        textarea:focus {
            border-color: #0c9f91;
        }

        button {
            background-color: #16BAAA;
            color: #fff;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #2ed0c0;
        }
    </style>
</head>
<body>
    <div class="pubblog-body">
        <div class="container">
            <h1>发布新博文</h1>
            <form action="${pageContext.request.contextPath}/blog/pblog.action" method="post">
                <label for="title">文章标题:</label>
                <input type="text" id="title" name="btitle" required>

                <label for="content">文章内容:</label>
                <textarea id="content" name="bcontent" rows="8" required></textarea>

                <button type="submit">发布</button>
                <button type="reset" onclick="tomyblog()">取消</button>
            </form>
        </div>
    </div>
<script>
    function tomyblog(){
       location.href ='${pageContext.request.contextPath}/blog/split_user.action'
    }
</script>
</body>
</html>
